Skip to content

Add 'unique-string' as an available type for marker payloads and schemas#4628

Merged
julienw merged 4 commits into
firefox-devtools:mainfrom
AdamBrouwersHarries:string-table-rendering
Jun 19, 2023
Merged

Add 'unique-string' as an available type for marker payloads and schemas#4628
julienw merged 4 commits into
firefox-devtools:mainfrom
AdamBrouwersHarries:string-table-rendering

Conversation

@AdamBrouwersHarries

Copy link
Copy Markdown
Contributor

This PR adds a new format to the profile marker schema, namely unique-string. This alows users to store indices into a string table as the data component of their marker, potentially saving space within a generated profile. This PR also bumps the gecko profile format version, as changes in the firefox backend which include unique-string data will break profiler frontends without support.

@codecov

codecov Bot commented May 24, 2023

Copy link
Copy Markdown

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (3a41d7c) 88.47% compared to head (bdba850) 88.47%.

❗ Current head bdba850 differs from pull request most recent head 60fcf43. Consider uploading reports for the commit 60fcf43 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4628   +/-   ##
=======================================
  Coverage   88.47%   88.47%           
=======================================
  Files         295      295           
  Lines       26290    26299    +9     
  Branches     7097     7099    +2     
=======================================
+ Hits        23260    23269    +9     
  Misses       2818     2818           
  Partials      212      212           
Impacted Files Coverage Δ
src/components/app/MenuButtons/MetaInfo.js 84.90% <ø> (ø)
src/components/tooltip/Marker.js 98.44% <ø> (ø)
src/selectors/per-thread/markers.js 93.63% <ø> (ø)
src/app-logic/constants.js 100.00% <100.00%> (ø)
src/profile-logic/gecko-profile-versioning.js 89.28% <100.00%> (+0.02%) ⬆️
src/profile-logic/marker-schema.js 89.33% <100.00%> (+0.14%) ⬆️
src/utils/unique-string-array.js 96.00% <100.00%> (+1.00%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@julienw julienw removed their request for review May 24, 2023 17:52
@julienw

julienw commented May 24, 2023

Copy link
Copy Markdown
Contributor

I'm letting Nazım look at this because he'll also look at the C++ side.

Comment thread src/app-logic/constants.js

@canova canova left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this! That's a great start! I added some comments below, let me know what you think.

Also, I think it would be good to have some test coverage for this new field to make sure that we don't regress it in the future. Could you add one to src/test/unit/marker-schema.test.js ? (I think this is the best file) You'll probably need to generate a new string table or a thread and pass it around as well to test it. But it should be fairly straightforward by creating it with new UniqueStringArray(["string 1", "string 2", ...])

Comment thread docs-developer/CHANGELOG-formats.md Outdated
Comment thread src/test/components/__snapshots__/MenuButtons.test.js.snap Outdated
Comment thread src/app-logic/constants.js
Comment thread src/profile-logic/marker-schema.js Outdated
Comment thread src/profile-logic/marker-schema.js Outdated
Comment thread src/profile-logic/marker-schema.js Outdated
Comment thread src/selectors/per-thread/markers.js Outdated
@canova

canova commented May 25, 2023

Copy link
Copy Markdown
Member

Also a nit: I think your git user might be misconfigured. It's using your mozilla email but it's not associated with this github account. You can either add your mozilla email to this github user from the settings or you can use your current user's email address to commit. Either way should work fine.

@AdamBrouwersHarries

Copy link
Copy Markdown
Contributor Author

@canova Thanks for the review, and the heads up about my git config! It should be easily sorted, and I'll make the requested changes ASAP.

@canova canova left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me, thanks for updating the PR.
As we discussed on Wednesday, it would be good to add some comments. Also I think you decided to update the changelog in the end. Feel free to land this PR after you push the latest changes, and after you fix the merge conflicts.

Comment thread src/test/unit/marker-schema.test.js Outdated
@AdamBrouwersHarries

Copy link
Copy Markdown
Contributor Author

Note: Due to some conflict issues I've done a local rebase, and had to force push (overwriting GitHub's own merge).

@canova canova left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks great!

@julienw julienw enabled auto-merge (squash) June 19, 2023 14:25
@julienw julienw merged commit ed4a724 into firefox-devtools:main Jun 19, 2023
@canova canova mentioned this pull request Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants